home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #4 / Amiga Plus CD - 2000 - No. 4.iso / Tools / Grafik / Misc / ImageEnginer / ARexx / ScanImage.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1997-01-28  |  1.2 KB  |  66 lines

  1. /* Script um mit ScanQuix in ImageEngineer zu scannen,
  2.    Scannersoftware laeuft auf der Workbench. */
  3.  
  4. /* © 1997 by Volkmar Funke */
  5.  
  6. /* $VER: ScanImage.rexx 1.0 (27.01.97) */
  7.  
  8.  
  9. address 'IMAGEENGINEER'
  10. options results
  11. options failat 25     /* ScanToDisk returns 0 or 20 */
  12.  
  13. TRACE OFF
  14.  
  15. tempfile='T:IE_ScannnedImage'
  16.  
  17. ok=1
  18. call SCAN()           /* Scans the image into a temporary file */
  19. call IMPORTGRAPHIC()  /* Loads Image into ImageEngineer */
  20. call DELETEFILE()     /* Removes temporary image file */
  21.  
  22. EXIT
  23.  
  24.  
  25.  
  26. SCAN:
  27. /* Scans the image into a temporary file using the program "ScanToDisk". */
  28.   if not 1=open('path','ENV:ScanQuix/Path','READ') then do
  29.     ok=0
  30.     return
  31.   end
  32.  
  33.   pragma('DIRECTORY',READLN('path'))
  34.   address command 'ScanQuix3/ScanToDisk FILE="'tempfile'" TRUECOLOR NOICONS  NOGUI PUBSCREEN=Workbench'
  35.   if RC>=5 then do
  36.   ok=0
  37.   return
  38.   end
  39.  
  40. return
  41.  
  42.  
  43.  
  44. IMPORTGRAPHIC:
  45. /* Loads the image into ImageEngineer */
  46.   if ok=0 then
  47.     return
  48.  
  49.   IE_TO_FRONT
  50.  
  51.   'Open' tempfile
  52.  
  53. if rc~=0 then do
  54.      ADDRESS 'IMAGEENGINEER'
  55.     REQUEST '"Scanner Fehler !!"' ' "OK" '
  56.     EXIT
  57. end
  58.  
  59.  
  60.  
  61. DELETEFILE:
  62. /* removes temporary file */
  63.   address command 'delete >NIL: 'tempfile
  64.  
  65. return
  66.